// worklet-processor.js
class MyAudioProcessor extends AudioWorkletProcessor {
  process(inputs, outputs, parameters) {
    const input = inputs[0];
    const output = outputs[0];

    // 将输入数据复制到输出
    for (let channel = 0; channel < input.length; channel++) {
      output[channel].set(input[channel]);
    }

    return true; // 保持处理器运行
  }
}

registerProcessor('my-audio-processor', MyAudioProcessor);
